package com.superlight.designer.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.superlight.designer.comm.R;
import com.superlight.designer.comm.animation.MultiRequestBody;
import com.superlight.designer.entity.Packing;
import com.superlight.designer.entity.Plan;
import com.superlight.designer.entity.vo.PageVO;
import com.superlight.designer.entity.vo.PlanVO;
import com.superlight.designer.service.IPackingService;
import com.superlight.designer.service.IPlanService;
import com.superlight.designer.wrapper.PageWrapper;
import com.superlight.designer.wrapper.PlanWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**方案控制器
 * @Classname PlanController
 * @Description TODO
 * @Date 2021/5/10 11:02
 * @Created by leishihua
 */
@Api(value = "包装信息控制器",description = "包装信息操作 API", position = 100, protocols = "http",tags = "包装信息控制器")
@RestController
@RequestMapping("packing")
public class PackingController {

    @Resource
    IPackingService packingService;

    @ApiOperation(
            value = "根据planId查询包装信息"
    )
    @GetMapping("/query_list_by_planId")
    @ResponseBody
    public R<List<Packing>> queryPageList(
            @ApiParam(value = "planId",required = false,defaultValue = "0",example = "0") @RequestParam(required = false) Integer planId
    ){
        return R.ok(packingService.selectListByPlanId(planId));
    }
}
